#pragma once
#include <d3dx9.h>
#include <dinput.h>
class FWGame;
#define ERROR_CREATE_DEVICE 0;
#define ERROR_CREATE_KEYBOOARD 1;
#define ERROR_SETFORMAT 2;
#define ERROR_SETCOOPERATIVE 3;
class FWKeyboard
{
private:
	FWGame* gameObject;
	char key[256];
public:
	LPDIRECTINPUT8 di8;
	LPDIRECTINPUTDEVICE8 did8;
	
	void getState();
	void saveState();
	bool isKeyDown(int key);
	bool isKeyPressed(int key);
	FWKeyboard(FWGame* game);
	~FWKeyboard(void);
};

